package com.ssm.entity;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;
import java.util.List;

public class Teacher {
    private Integer tId;

    private String tName;

    private Integer tGender;

    private Integer tAge;

    private String tDuty;

    @JSONField(format="yyyy-MM-dd")
    private Date tEntrance;

    @JSONField(format="yyyy-MM-dd")
    private Date tLeave;

    private String tEamil;

    private String tPhotos;

    private Integer tStatus;

    //老师和学生的多对多关系
    private List<Student> students;

    //老师和班级的多对多关系
    private List<ClassRoom> classRooms;

    public Integer gettId() {
        return tId;
    }

    public void settId(Integer tId) {
        this.tId = tId;
    }

    public String gettName() {
        return tName;
    }

    public void settName(String tName) {
        this.tName = tName == null ? null : tName.trim();
    }

    public Integer gettGender() {
        return tGender;
    }

    public void settGender(Integer tGender) {
        this.tGender = tGender;
    }

    public Integer gettAge() {
        return tAge;
    }

    public void settAge(Integer tAge) {
        this.tAge = tAge;
    }

    public String gettDuty() {
        return tDuty;
    }

    public void settDuty(String tDuty) {
        this.tDuty = tDuty == null ? null : tDuty.trim();
    }

    public Date gettEntrance() {
        return tEntrance;
    }

    public void settEntrance(Date tEntrance) {
        this.tEntrance = tEntrance;
    }

    public Date gettLeave() {
        return tLeave;
    }

    public void settLeave(Date tLeave) {
        this.tLeave = tLeave;
    }

    public String gettEamil() {
        return tEamil;
    }

    public void settEamil(String tEamil) {
        this.tEamil = tEamil == null ? null : tEamil.trim();
    }

    public String gettPhotos() {
        return tPhotos;
    }

    public void settPhotos(String tPhotos) {
        this.tPhotos = tPhotos == null ? null : tPhotos.trim();
    }

    public Integer gettStatus() {
        return tStatus;
    }

    public void settStatus(Integer tStatus) {
        this.tStatus = tStatus;
    }

    public List<Student> getStudents() {
        return students;
    }

    public void setStudents(List<Student> students) {
        this.students = students;
    }

    public List<ClassRoom> getClassRooms() {
        return classRooms;
    }

    public void setClassRooms(List<ClassRoom> classRooms) {
        this.classRooms = classRooms;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "tId=" + tId +
                ", tName='" + tName + '\'' +
                ", tGender=" + tGender +
                ", tAge=" + tAge +
                ", tDuty='" + tDuty + '\'' +
                ", tEntrance=" + tEntrance +
                ", tLeave=" + tLeave +
                ", tEamil='" + tEamil + '\'' +
                ", tPhotos='" + tPhotos + '\'' +
                ", tStatus=" + tStatus +
                ", students=" + students +
                ", classRooms=" + classRooms +
                '}';
    }
}